import Vue from 'vue'
/** 
 * 病例-婚育史服务管理
 */
export default {
  /**
   * 添加婚育史
   *
   * @param {*} [params={}]
   * @param {*} [config={}]
   * @returns
   */
  async addMarriage(params = {}, config = {}) {
    let result = await Vue.http.post('/MedicalRecordMarriage/AddMarriage', params, config);
    return result;
  },
  /**
   * 通过编号获取婚育史
   *
   * @param {*} [params={}]
   * @param {*} [config={}]
   * @returns
   */
  async getMarriageByID(params = {}, config = {}) {
    config.params = params;
    let result = await Vue.http.get('/MedicalRecordMarriage/GetMarriageByID', config);
    return result;
  },
  /**
   * 通过用户编号获取婚育史
   *
   * @param {*} [params={}]
   * @param {*} [config={}]
   * @returns
   */
  async getMarriageListByUserID(params = {}, config = {}) {
    config.params = params;
    let result = await Vue.http.get('/MedicalRecordMarriage/GetMarriageListByUserID', config);
    return result;
  },
  /**
   * 更新婚育史
   *
   * @param {*} [params={}]
   * @param {*} [config={}]
   * @returns
   */
  async updateMarriage(params = {}, config = {}) {
    let result = await Vue.http.put('/MedicalRecordMarriage/UpdateMarriage', params, config);
    return result;
  }
}
